//
//  DBJAddIllCaseThreeTabCell.m
//  DBJ
//
//  Created by Captain_czq on 16/11/14.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "DBJAddIllCaseThreeTabCell.h"
#import "DBJTagsView.h"
#import "BtnView.h"
#import <Masonry.h>
@interface DBJAddIllCaseThreeTabCell ()

@property (weak, nonatomic) IBOutlet DBJTagsView *tagsView;
@property (weak, nonatomic) IBOutlet UITextView *descTexetFiled;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *descTextFiledHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *descTopConstraint;


@end
@implementation DBJAddIllCaseThreeTabCell

- (IBAction)addBtnTag:(UIButton *)sender {
    
    if([self.delegate respondsToSelector:@selector(addBtnTagCell:)]){
           [self.delegate addBtnTagCell:self];
       }
}

#pragma mark -重写tagarry方法
-(void)setTagsArry:(NSArray *)tagsArry{
    
    _tagsArry=tagsArry;
    self.tagsView.tags=tagsArry;
    self.tagsView.alpha=1;
    self.descTextFiledHeight.constant=100;
//    CGPoint center=CGPointMake(self.descTexetFiled.center.x, self.descTexetFiled.center.y+100);
//    self.descTexetFiled.center=center;
//    CGRect frame=CGRectMake(self.descTexetFiled.frame.origin.x, self.descTexetFiled.frame.origin.y+100, self.descTexetFiled.bounds.size.width, self.descTexetFiled.bounds.size.height);
//    self.descTexetFiled.frame=frame;
    self.descTopConstraint.constant=70;
    self.descTexetFiled.textAlignment=NSTextAlignmentLeft;
    
}

/* 实现获取病例描述的方法 */
-(NSString *)getDescText{
    return self.descTexetFiled.text;
}

/* 重写textView的get方法 */
-(UITextView *)updatextView{
    _updatextView=self.descTexetFiled;
//    UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickTap:)];
//    UILabel * textLabel = [[UILabel alloc]initWithFrame:CGRectMake(3, 3, 200, 20)];
////    textLabel.enabled = NO;
////    textLabel.text = @"请在这里描述病情";
////    textLabel.font =  [UIFont systemFontOfSize:15];
////    textLabel.textColor = [UIColor lightGrayColor];
////    [ _updatextView addSubview:textLabel];
//    [_updatextView addGestureRecognizer:tap];
    
    //记录属性
//   self.testViewsubLabel=textLabel;
    return _updatextView;
    
}

@end
